<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: The Script will retrieve and display the permissions for each access rule defined on the specified folder. # Parameters: User Based Configuration: User Based Location: "C:\Users\john\Desktop" Computer Based Configuration: Computer Based Location: "C:\test\NewFolder" # Remarks: The script has to be deployed as Computer / User Configuration based on the folder location # Configuration Type - Computer / User #> $folderPath = $args[0] # Replace with the desired folder path $acl = Get-Acl -Path $folderPath foreach ($accessRule in $acl.Access) { $identity = $accessRule.IdentityReference $accessControlType = $accessRule.AccessControlType $permissions = $accessRule.FileSystemRights Write-Host "Identity: $identity" Write-Host "Access Control Type: $accessControlType" Write-Host "Permissions: $permissions" Write-Host }